package Try;

/**
 * Created by dell on 2017/5/14.
 */
import java.text.NumberFormat;
import java.util.*;
public class PracticeTest {
    public static void main(String[] args) {
        Practice pra = new Practice();
        Scanner scan = new Scanner(System.in);
        NumberFormat nf = NumberFormat.getPercentInstance();

        System.out.print("您需要的题目数量：");
        int Tinumber = scan.nextInt();

        System.out.print("需要的题目等级：");
        //如a+b为一级题目且每增加一个数字一个运算符为增加一级.
        int Ticlass = scan.nextInt();

        pra.Ti(Tinumber, Ticlass);
        pra.show();

        System.out.println("答对的题目数：" + pra.getTrues());
        double trues = (double) pra.getTrues() / Tinumber;
        System.out.println("正确率为：" + nf.format(trues));
    }
}